<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var personStr='{"name":"张三","age":"20","dog":{"name":"小黑"}}'
        var person=JSON.parse(personStr)
        console.log(person.name)
        console.log(person.age)
        console.log(person.dog.name)  
        var personStr2=JSON.stringify(person)
        console.log(personStr2)
    </script>
</head>
<body>
    
</body>
</html>